"""\
GameMain is a game-controlling FSM class inherit from GameFSM.

It overrides these function:
    DoGameLoadHandle
    DoGameRunHandle
    DoGamePauseHandle
    DoGameReConfigureHandle
    DoGameOverHandle
    DoGameTerminateHandle

GameMain.__init__(self)
    Create a GameMain.
"""

from GameFSM import GameFSM
from Shell.ghost.AsteroidsMain import GameWorld

class GameMain(GameFSM):
    def __init__(self):
        GameFSM.__init__(self)

        self.GameWorld = GameWorld()

    # override handler of GameFSM -----------------------------------
    def DoGameLoadHandle(self):
        self.GameWorld.GameLoad()

    def DoGameRunHandle(self):
        self.GameWorld.GameRun()

    def DoGamePauseHandle(self):
        self.GameWorld.GamePause()

    def DoGameReConfigureHandle(self):
        self.GameWorld.GameReConfigure()

    def DoGameOverHandle(self):
        self.GameWorld.GameOver()

    def DoGameTerminateHandle(self):
        self.GameWorld.GameTerminate()

